using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(fileName = "New Player State", menuName = "Player State")]
public class PlayerStats : ScriptableObject
{
	[Header("Config")]
	public int level;

	[Header("Health")] 
	public float health;
	public float maxHealth;

	[Header("Mana")]
	public float mana;
	public float maxMana;

	[Header("Exp")]
	// 当前经验
	public float currentExp;
	// 还需要多少经验可以升级
	public float nextLevelExp;
	// 升下一级的经验
	public float initialNextLevelExp;
	// 升级经验的倍率，例如：50，lv1 100，lv2 150, lv3 225...， lvN+1 = lvN + (lvN * 倍率)
	[Range(1f, 100f)] public float expMultiplier;
	

	public void ResetPlayer()
	{
		health = maxHealth;
		mana = maxMana;

		level = 1;
		currentExp = 0f;
		nextLevelExp = initialNextLevelExp;
	}

}
